package calendarios;

import java.util.*;
import java.io.*;

public class Practica02_FechaSemana{
    static String fecha1Intro;
    static String fecha2Intro;
    static long difms;
    static long difd;
    static String diaSpanish;

    public static void main(String[] args) throws IOException{
        Calendar fecha1 = Calendar.getInstance();
        fecha1.set(2012, 1, 28);
        
        System.out.println("El día de la primera fecha es: " + fecha1.get(Calendar.DAY_OF_WEEK));
        switch (fecha1.get(Calendar.DAY_OF_WEEK)) {
            case 1:
                diaSpanish = "Sabado";
                break;
            case 2:
                diaSpanish = "Domingo";
                break;
            case 3:
                diaSpanish = "Lunes";
                break;
            case 4:
                diaSpanish = "Martes";
                break;
            case 5:
                diaSpanish = "Miercoles";
                break;
            case 6:
                diaSpanish = "Jueves";
                break;
            case 7:
                diaSpanish = "Viernes";
                break;
            default:
                throw new AssertionError();
        }
        System.out.println("El día de la semana es el " + diaSpanish);
    }
}